﻿/* Author - Anshu Dutta - anshu.dutta@gmail.com
 * This source code is governed by terms and condition of Microsoft Public License (Ms-PL). 
 * Copyright (C)  2011 Anshu Dutta. anshu.dutta@gmail.com
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RssNewsFeeder.Lib.Model.Business
{
    public class NewsCategoryCollection:IDisposable
    {
        private Data.DataAccessLayer _dal;
        private List<object> _newsCategories;

        public NewsCategoryCollection()
        {
            _dal = Data.DataAccessLayer.CreateInstance();
            _newsCategories = new List<object>();
        }

        public List<object> NewsCategories
        {
            get
            {
                GetNewsCategoryCollection();
                return _newsCategories;
            }
        }
        private void GetNewsCategoryCollection()
        {
           _newsCategories= _dal.GetNewsCategoryCollection();
        }

        #region IDisposable Members

        void IDisposable.Dispose()
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
